home *** CD-ROM | disk | FTP | other *** search
/ Belgian Amiga Club - ADF Collection / BS1 part 34.zip / BS1 part 34 / Aztec C 5.0a disk 1.adf / include / intuition / intuition.h next >
C/C++ Source or Header  |  1988-07-15  |  9KB  |  416 lines

  1. #ifndef    INTUITION_INTUITION_H
  2. #define    INTUITION_INTUITION_H
  3. #ifndef    EXEC_TYPES_H
  4. #include    "exec/types.h"
  5. #endif
  6. #ifndef    GRAPHICS_GFX_H
  7. #include    "graphics/gfx.h"
  8. #endif
  9. #ifndef    GRAPHICS_CLIP_H
  10. #include    "graphics/clip.h"
  11. #endif
  12. #ifndef    GRAPHICS_VIEW_H
  13. #include    "graphics/view.h"
  14. #endif
  15. #ifndef    GRAPHICS_RASTPORT_H
  16. #include    "graphics/rastport.h"
  17. #endif
  18. #ifndef    GRAPHICS_LAYERS_H
  19. #include    "graphics/layers.h"
  20. #endif
  21. #ifndef    GRAPHICS_TEXT_H
  22. #include    "graphics/text.h"
  23. #endif
  24. #ifndef    EXEC_PORTS_H
  25. #include    "exec/ports.h"
  26. #endif
  27. #ifndef    DEVICES_TIMER_H
  28. #include    "devices/timer.h"
  29. #endif
  30. #ifndef    DEVICES_INPUTEVENT_H
  31. #include    "devices/inputevent.h"
  32. #endif
  33. struct    Menu
  34. {
  35. struct    Menu    *NextMenu;
  36. SHORT    LeftEdge,    TopEdge;
  37. SHORT    Width,    Height;
  38. USHORT    Flags;
  39. BYTE    *MenuName;
  40. struct    MenuItem    *FirstItem;
  41. SHORT    JazzX,    JazzY,    BeatX,    BeatY;
  42. };
  43. #define    MENUENABLED    0x0001
  44. #define    MIDRAWN    0x0100
  45. struct    MenuItem
  46. {
  47. struct    MenuItem    *NextItem;
  48. SHORT    LeftEdge,    TopEdge;
  49. SHORT    Width,    Height;
  50. USHORT    Flags;
  51. LONG    MutualExclude;
  52. APTR    ItemFill;
  53. APTR    SelectFill;
  54. BYTE    Command;
  55. struct    MenuItem    *SubItem;
  56. USHORT    NextSelect;
  57. };
  58. #define    CHECKIT    0x0001
  59. #define    ITEMTEXT    0x0002
  60. #define    COMMSEQ    0x0004
  61. #define    MENUTOGGLE    0x0008
  62. #define    ITEMENABLED    0x0010
  63. #define    HIGHFLAGS    0x00C0
  64. #define    HIGHIMAGE    0x0000
  65. #define    HIGHCOMP    0x0040
  66. #define    HIGHBOX    0x0080
  67. #define    HIGHNONE    0x00C0
  68. #define    CHECKED    0x0100
  69. #define    ISDRAWN    0x1000
  70. #define    HIGHITEM    0x2000
  71. #define    MENUTOGGLED    0x4000
  72. struct    Requester
  73. {
  74. struct    Requester    *OlderRequest;
  75. SHORT    LeftEdge,    TopEdge;
  76. SHORT    Width,    Height;
  77. SHORT    RelLeft,    RelTop;
  78. struct    Gadget    *ReqGadget;
  79. struct    Border    *ReqBorder;
  80. struct    IntuiText    *ReqText;
  81. USHORT    Flags;
  82. UBYTE    BackFill;
  83. struct    Layer    *ReqLayer;
  84. UBYTE    ReqPad1[32];
  85. struct    BitMap    *ImageBMap;
  86. struct    Window    *RWindow;
  87. UBYTE    ReqPad2[36];
  88. };
  89. #define    POINTREL    0x0001
  90. #define    PREDRAWN    0x0002
  91. #define    NOISYREQ    0x0004
  92. #define    REQOFFWINDOW    0x1000
  93. #define    REQACTIVE    0x2000
  94. #define    SYSREQUEST    0x4000
  95. #define    DEFERREFRESH    0x8000
  96. struct    Gadget
  97. {
  98. struct    Gadget    *NextGadget;
  99. SHORT    LeftEdge,    TopEdge;
  100. SHORT    Width,    Height;
  101. USHORT    Flags;
  102. USHORT    Activation;
  103. USHORT    GadgetType;
  104. APTR    GadgetRender;
  105. APTR    SelectRender;
  106. struct    IntuiText    *GadgetText;
  107. LONG    MutualExclude;
  108. APTR    SpecialInfo;
  109. USHORT    GadgetID;
  110. APTR    UserData;
  111. };
  112. #define    GADGHIGHBITS    0x0003
  113. #define    GADGHCOMP    0x0000
  114. #define    GADGHBOX    0x0001
  115. #define    GADGHIMAGE    0x0002
  116. #define    GADGHNONE    0x0003
  117. #define    GADGIMAGE    0x0004
  118. #define    GRELBOTTOM    0x0008
  119. #define    GRELRIGHT    0x0010
  120. #define    GRELWIDTH    0x0020
  121. #define    GRELHEIGHT    0x0040
  122. #define    SELECTED    0x0080
  123. #define    GADGDISABLED    0x0100
  124. #define    RELVERIFY    0x0001
  125. #define    GADGIMMEDIATE    0x0002
  126. #define    ENDGADGET    0x0004
  127. #define    FOLLOWMOUSE    0x0008
  128. #define    RIGHTBORDER    0x0010
  129. #define    LEFTBORDER    0x0020
  130. #define    TOPBORDER    0x0040
  131. #define    BOTTOMBORDER    0x0080
  132. #define    TOGGLESELECT    0x0100
  133. #define    STRINGCENTER    0x0200
  134. #define    STRINGRIGHT    0x0400
  135. #define    LONGINT    0x0800
  136. #define    ALTKEYMAP    0x1000
  137. #define    BOOLEXTEND    0x2000
  138. #define    GADGETTYPE    0xFC00
  139. #define    SYSGADGET    0x8000
  140. #define    SCRGADGET    0x4000
  141. #define    GZZGADGET    0x2000
  142. #define    REQGADGET    0x1000
  143. #define    SIZING    0x0010
  144. #define    WDRAGGING    0x0020
  145. #define    SDRAGGING    0x0030
  146. #define    WUPFRONT    0x0040
  147. #define    SUPFRONT    0x0050
  148. #define    WDOWNBACK    0x0060
  149. #define    SDOWNBACK    0x0070
  150. #define    CLOSE    0x0080
  151. #define    BOOLGADGET    0x0001
  152. #define    GADGET0002    0x0002
  153. #define    PROPGADGET    0x0003
  154. #define    STRGADGET    0x0004
  155. struct    BoolInfo
  156. {
  157. USHORT    Flags;
  158. UWORD    *Mask;
  159. ULONG    Reserved;
  160. };
  161. #define    BOOLMASK    0x0001
  162. struct    PropInfo
  163. {
  164. USHORT    Flags;
  165. USHORT    HorizPot;
  166. USHORT    VertPot;
  167. USHORT    HorizBody;
  168. USHORT    VertBody;
  169. USHORT    CWidth;
  170. USHORT    CHeight;
  171. USHORT    HPotRes,    VPotRes;
  172. USHORT    LeftBorder;
  173. USHORT    TopBorder;
  174. };
  175. #define    AUTOKNOB    0x0001
  176. #define    FREEHORIZ    0x0002
  177. #define    FREEVERT    0x0004
  178. #define    PROPBORDERLESS    0x0008
  179. #define    KNOBHIT    0x0100
  180. #define    KNOBHMIN    6
  181. #define    KNOBVMIN    4
  182. #define    MAXBODY    0xFFFF
  183. #define    MAXPOT    0xFFFF
  184. struct    StringInfo
  185. {
  186. UBYTE    *Buffer;
  187. UBYTE    *UndoBuffer;
  188. SHORT    BufferPos;
  189. SHORT    MaxChars;
  190. SHORT    DispPos;
  191. SHORT    UndoPos;
  192. SHORT    NumChars;
  193. SHORT    DispCount;
  194. SHORT    CLeft,    CTop;
  195. struct    Layer    *LayerPtr;
  196. LONG    LongInt;
  197. struct    KeyMap    *AltKeyMap;
  198. };
  199. struct    IntuiText
  200. {
  201. UBYTE    FrontPen,    BackPen;
  202. UBYTE    DrawMode;
  203. SHORT    LeftEdge;
  204. SHORT    TopEdge;
  205. struct    TextAttr    *ITextFont;
  206. UBYTE    *IText;
  207. struct    IntuiText    *NextText;
  208. };
  209. struct    Border
  210. {
  211. SHORT    LeftEdge,    TopEdge;
  212. UBYTE    FrontPen,    BackPen;
  213. UBYTE    DrawMode;
  214. BYTE    Count;
  215. SHORT    *XY;
  216. struct    Border    *NextBorder;
  217. };
  218. struct    Image
  219. {
  220. SHORT    LeftEdge;
  221. SHORT    TopEdge;
  222. SHORT    Width;
  223. SHORT    Height,    Depth;
  224. USHORT    *ImageData;
  225. UBYTE    PlanePick,    PlaneOnOff;
  226. struct    Image    *NextImage;
  227. };
  228. struct    IntuiMessage
  229. {
  230. struct    Message    ExecMessage;
  231. ULONG    Class;
  232. USHORT    Code;
  233. USHORT    Qualifier;
  234. APTR    IAddress;
  235. SHORT    MouseX,    MouseY;
  236. ULONG    Seconds,    Micros;
  237. struct    Window    *IDCMPWindow;
  238. struct    IntuiMessage    *SpecialLink;
  239. };
  240. #define    SIZEVERIFY    0x00000001
  241. #define    NEWSIZE    0x00000002
  242. #define    REFRESHWINDOW    0x00000004
  243. #define    MOUSEBUTTONS    0x00000008
  244. #define    MOUSEMOVE    0x00000010
  245. #define    GADGETDOWN    0x00000020
  246. #define    GADGETUP    0x00000040
  247. #define    REQSET    0x00000080
  248. #define    MENUPICK    0x00000100
  249. #define    CLOSEWINDOW    0x00000200
  250. #define    RAWKEY    0x00000400
  251. #define    REQVERIFY    0x00000800
  252. #define    REQCLEAR    0x00001000
  253. #define    MENUVERIFY    0x00002000
  254. #define    NEWPREFS    0x00004000
  255. #define    DISKINSERTED    0x00008000
  256. #define    DISKREMOVED    0x00010000
  257. #define    WBENCHMESSAGE    0x00020000
  258. #define    ACTIVEWINDOW    0x00040000
  259. #define    INACTIVEWINDOW    0x00080000
  260. #define    DELTAMOVE    0x00100000
  261. #define    VANILLAKEY    0x00200000
  262. #define    INTUITICKS    0x00400000
  263. #define    LONELYMESSAGE    0x80000000
  264. #define    MENUHOT    0x0001
  265. #define    MENUCANCEL    0x0002
  266. #define    MENUWAITING    0x0003
  267. #define    OKOK    MENUHOT
  268. #define    OKABORT    0x0004
  269. #define    OKCANCEL    MENUCANCEL
  270. #define    WBENCHOPEN    0x0001
  271. #define    WBENCHCLOSE    0x0002
  272. struct    Window
  273. {
  274. struct    Window    *NextWindow;
  275. SHORT    LeftEdge,    TopEdge;
  276. SHORT    Width,    Height;
  277. SHORT    MouseY,    MouseX;
  278. SHORT    MinWidth,    MinHeight;
  279. USHORT    MaxWidth,    MaxHeight;
  280. ULONG    Flags;
  281. struct    Menu    *MenuStrip;
  282. UBYTE    *Title;
  283. struct    Requester    *FirstRequest;
  284. struct    Requester    *DMRequest;
  285. SHORT    ReqCount;
  286. struct    Screen    *WScreen;
  287. struct    RastPort    *RPort;
  288. BYTE    BorderLeft,    BorderTop,    BorderRight,    BorderBottom;
  289. struct    RastPort    *BorderRPort;
  290. struct    Gadget    *FirstGadget;
  291. struct    Window    *Parent,    *Descendant;
  292. USHORT    *Pointer;
  293. BYTE    PtrHeight;
  294. BYTE    PtrWidth;
  295. BYTE    XOffset,    YOffset;
  296. ULONG    IDCMPFlags;
  297. struct    MsgPort    *UserPort,    *WindowPort;
  298. struct    IntuiMessage    *MessageKey;
  299. UBYTE    DetailPen,    BlockPen;
  300. struct    Image    *CheckMark;
  301. UBYTE    *ScreenTitle;
  302. SHORT    GZZMouseX;
  303. SHORT    GZZMouseY;
  304. SHORT    GZZWidth;
  305. SHORT    GZZHeight;
  306. UBYTE    *ExtData;
  307. BYTE    *UserData;
  308. struct    Layer    *WLayer;
  309. struct    TextFont    *IFont;
  310. };
  311. #define    WINDOWSIZING    0x0001
  312. #define    WINDOWDRAG    0x0002
  313. #define    WINDOWDEPTH    0x0004
  314. #define    WINDOWCLOSE    0x0008
  315. #define    SIZEBRIGHT    0x0010
  316. #define    SIZEBBOTTOM    0x0020
  317. #define    REFRESHBITS    0x00C0
  318. #define    SMART_REFRESH    0x0000
  319. #define    SIMPLE_REFRESH    0x0040
  320. #define    SUPER_BITMAP    0x0080
  321. #define    OTHER_REFRESH    0x00C0
  322. #define    BACKDROP    0x0100
  323. #define    REPORTMOUSE    0x0200
  324. #define    GIMMEZEROZERO    0x0400
  325. #define    BORDERLESS    0x0800
  326. #define    ACTIVATE    0x1000
  327. #define    WINDOWACTIVE    0x2000
  328. #define    INREQUEST    0x4000
  329. #define    MENUSTATE    0x8000
  330. #define    RMBTRAP    0x00010000
  331. #define    NOCAREREFRESH    0x00020000
  332. #define    WINDOWREFRESH    0x01000000
  333. #define    WBENCHWINDOW    0x02000000
  334. #define    WINDOWTICKED    0x04000000
  335. #define    SUPER_UNUSED    0xFCFC0000
  336. struct    NewWindow
  337. {
  338. SHORT    LeftEdge,    TopEdge;
  339. SHORT    Width,    Height;
  340. UBYTE    DetailPen,    BlockPen;
  341. ULONG    IDCMPFlags;
  342. ULONG    Flags;
  343. struct    Gadget    *FirstGadget;
  344. struct    Image    *CheckMark;
  345. UBYTE    *Title;
  346. struct    Screen    *Screen;
  347. struct    BitMap    *BitMap;
  348. SHORT    MinWidth,    MinHeight;
  349. USHORT    MaxWidth,    MaxHeight;
  350. USHORT    Type;
  351. };
  352. #ifndef    INTUITION_SCREENS_H
  353. #include    "intuition/screens.h"
  354. #endif
  355. #ifndef    INTUITION_PREFERENCES_H
  356. #include    "intuition/preferences.h"
  357. #endif
  358. struct    Remember
  359. {
  360. struct    Remember    *NextRemember;
  361. ULONG    RememberSize;
  362. UBYTE    *Memory;
  363. };
  364. #define    MENUNUM(n)    (n    &    0x1F)
  365. #define    ITEMNUM(n)    ((n    >>    5)    &    0x003F)
  366. #define    SUBNUM(n)    ((n    >>    11)    &    0x001F)
  367. #define    SHIFTMENU(n)    (n    &    0x1F)
  368. #define    SHIFTITEM(n)    ((n    &    0x3F)    <<    5)
  369. #define    SHIFTSUB(n)    ((n    &    0x1F)    <<    11)
  370. #define    SRBNUM(n)    (0x08    -    (n    >>    4))
  371. #define    SWBNUM(n)    (0x08    -    (n    &    0x0F))
  372. #define    SSBNUM(n)    (0x01    +    (n    >>    4))
  373. #define    SPARNUM(n)    (n    >>    4)
  374. #define    SHAKNUM(n)    (n    &    0x0F)
  375. #define    NOMENU    0x001F
  376. #define    NOITEM    0x003F
  377. #define    NOSUB    0x001F
  378. #define    MENUNULL    0xFFFF
  379. #define    FOREVER    for(;;)
  380. #define    SIGN(x)    (    ((x)    >    0)    -    ((x)    <    0)    )
  381. #define    NOT    !
  382. #define    CHECKWIDTH    19
  383. #define    COMMWIDTH    27
  384. #define    LOWCHECKWIDTH    13
  385. #define    LOWCOMMWIDTH    16
  386. #define    ALERT_TYPE    0x80000000
  387. #define    RECOVERY_ALERT    0x00000000
  388. #define    DEADEND_ALERT    0x80000000
  389. #define    AUTOFRONTPEN    0
  390. #define    AUTOBACKPEN    1
  391. #define    AUTODRAWMODE    JAM2
  392. #define    AUTOLEFTEDGE    6
  393. #define    AUTOTOPEDGE    3
  394. #define    AUTOITEXTFONT    NULL
  395. #define    AUTONEXTTEXT    NULL
  396. #define    SELECTUP    (IECODE_LBUTTON    |    IECODE_UP_PREFIX)
  397. #define    SELECTDOWN    (IECODE_LBUTTON)
  398. #define    MENUUP    (IECODE_RBUTTON    |    IECODE_UP_PREFIX)
  399. #define    MENUDOWN    (IECODE_RBUTTON)
  400. #define    ALTLEFT    (IEQUALIFIER_LALT)
  401. #define    ALTRIGHT    (IEQUALIFIER_RALT)
  402. #define    AMIGALEFT    (IEQUALIFIER_LCOMMAND)
  403. #define    AMIGARIGHT    (IEQUALIFIER_RCOMMAND)
  404. #define    AMIGAKEYS    (AMIGALEFT    |    AMIGARIGHT)
  405. #define    CURSORUP    0x4C
  406. #define    CURSORLEFT    0x4F
  407. #define    CURSORRIGHT    0x4E
  408. #define    CURSORDOWN    0x4D
  409. #define    KEYCODE_Q    0x10
  410. #define    KEYCODE_X    0x32
  411. #define    KEYCODE_N    0x36
  412. #define    KEYCODE_M    0x37
  413. #define    KEYCODE_V    0x34
  414. #define    KEYCODE_B    0x35
  415. #endif
  416.